<%--
  Created by IntelliJ IDEA.
  User: V
  Date: 2017/4/13
  Time: 17:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link rel="stylesheet" href="../css/bootstrap.css">
<html>
<head>
    <title>Title</title>
    <style type="text/css">
        table{
            border: 1px solid blueviolet;
        }
        td{
            border: 1px solid blueviolet;
            text-align: center;
        }
        tr{
            border: 1px solid blueviolet;
        }
        th{border: 1px solid blueviolet;}
        #d3{
            width: 100%;
            height: 200px;
            text-align: center;
            line-height: 100px;
            margin: 200px auto;
        }
    </style>
</head>
<body>
<div>
    <div>
        用户详细信息
    </div><table >
    <tr>
        <th>id</th>
        <th>年龄</th>
        <th>用户名</th>
        <th>头像</th>
        <th>性别</th>
        <th>身份证号</th>
        <th>国籍</th>
        <th>省份</th>
        <th>城市</th>
        <th>区域</th>
        <th>电子邮件</th>
        <th>电话号码</th>
        <th>创建日期</th>
        <th>操作</th>

    </tr>
    <c:forEach items="${page.list}" var="usr">
        <tr>
            <td>${usr.id}</td>
            <td>${usr.age}</td>
            <td>${usr.username}</td>
            <td>${usr.headImg}</td>
            <td>${usr.sex}</td>
            <td>${usr.idNumber}</td>
            <td>${usr.country}</td>
            <td>${usr.province}</td>
            <td>${usr.city}</td>
            <td>${usr.area}</td>
            <td>${usr.email}</td>
            <td>${usr.phone}</td>
            <td>${usr.createDate}</td>
            <td><a href="Update.jsp?id=${usr.id}">编辑</a> | <a href="Delete?id=${usr.id}">删除</a> </td>

        </tr>
    </c:forEach>
</table>
    <div class ="pager">
        <table class="gridtable" style="width:100%;text-align: center;">
            <tr>
                <%--上一页 hasPreviousPage布尔值是否有上一页，prePage上一页页面--%>
                <c:if test="${page.hasPreviousPage}">
                    <td><a href="${pageContext.request.contextPath}/usr?pageNum=${page.prePage}&pageSize=${page.pageSize}">前一页</a></td>
                </c:if>
                <%--navigatepageNums 集合所有页码  --%>
                <c:forEach items="${page.navigatepageNums}" var="nav">
                    <c:if test="${nav == page.pageNum}">
                        <td style="font-weight: bold;">${nav}</td>
                    </c:if>
                    <c:if test="${nav != page.pageNum}">
                        <td><a href="${pageContext.request.contextPath}/usr?pageNum=${nav}&pageSize=${page.pageSize}">${nav}</a></td>
                    </c:if>
                </c:forEach>
                <%--hasNextPage 布尔值判断是否有下一页 nextPage下一页的页码--%>
                <c:if test="${page.hasNextPage}">
                    <td><a href="${pageContext.request.contextPath}/usr?pageNum=${page.nextPage}&pageSize=${page.pageSize}">下一页</a></td>
                </c:if>
            </tr>
        </table>


    </div>
</div>


</body>
</html>
